<template>
  <div id="handOverDetails" class="mainContent">
    <div class="information" v-if="JSON.stringify(handOverData) != '{}'">
      <div class="row">
        <div class="col-sm-8 " style="display: flex;align-items: center;height:36px;">
          <div class="col-sm-8" style="display: flex;align-items: center;">
            <span>交班日期：{{date}}</span>
          </div>
          <div class="col-sm-4">
            <span>填写人：{{loginUser.Name}}</span>
          </div>
        </div>
        <div class="col-sm-4">
          <button @click="btnSave">保存</button>
          <button @click="btnPrint">打印</button>
          <button @click="btnUpdate">更新</button>
        </div>
      </div>
    </div>
    <div class="handOverContent" v-if="JSON.stringify(handOverData) != '{}'">
      <!--入院基本信息-->
      <div class="admission ">
        <div class="title"><span>入院情况</span></div>
        <div class="row">
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">主 诉：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].CHIEF_COMLPAINT}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">现病史：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].PRESENT_ILL_HISTORY}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">既往史：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].PREVIOUS_HISTORY}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">药物史：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].MEDICATION_HISTORY}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">入院诊断：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].ADMITTING_DIAGNOSIS}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">入ICU诊断：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].INICU_DIAGNOSIS}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label for="inReason" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">入ICU原因：</label>
            <div class="col-sm-8 ">
              <input type="text" class="form-control" id="inReason" placeholder="请输入原因" v-model="saveChange.PATIENT_RECORD.AMDITTING_REASON">
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 ">APACHE II 评分：</label>
            <div class="col-sm-8 ">
              {{handOverData.tblPatientRecord[0].APACHEII_SCORE}}
            </div>
          </div>
        </div>
      </div>
      <!--手术情况-->
      <div class="surgery">
        <div class="title"><span>手术情况</span></div>
        <div class="form-group clearfix" v-if="handOverData.tblOperation.length">
          <label class="col-sm-3  control-label text-right col-lg-2 ">{{handOverData.tblOperation[0].OperationName}}：</label>
          <div class="col-sm-8 ">
            {{handOverData.tblOperation[0].OperationTime | filterDateT}}
          </div>
        </div>
        <div style="color:red;padding-left:10%;" v-if="!handOverData.tblOperation.length">
          当前该患者没有手术
        </div>
      </div>
      <!--体格检查-->
      <div class="physique">
        <div class="title"><span>体格检查</span></div>
        <div class="form-group clearfix">
          <label for="generally" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">一般情况：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="generally" placeholder="氧疗模式、神治情况、血压是否稳定" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_GENERAL">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="headFace" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">头面部：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="headFace" placeholder="头/眼/耳/鼻/喉咙" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_HEENT">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="cardiovascular" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">心血管：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="cardiovascular" placeholder="RRR,nl S1/S2，no m/r/g" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_CV">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="lung" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;"> 肺(lungs) ：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="lung" placeholder="呼吸音/啰音" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_LUNGS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Gastrointestinal" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">胃肠道：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="Gastrointestinal" placeholder="压痛/反跳痛/长鸣音" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_ABD">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Limbs" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">四 肢：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="Limbs" placeholder="青紫/杵状指/水肿/温暖/却冷" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_EXT">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Neuro" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">神 志：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="Neuro" placeholder="清醒/昏迷/病理征" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_NEURO">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Skin" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">皮 肤：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="Skin" placeholder="是否完整/皮疹" v-model="saveChange.PATIENT_RECORD_EXAM.EXAM_SKIN">
          </div>
        </div>
      </div>
      <!--最近生命体征-->
      <div class="vitalSigns" v-if="">
        <div class="title"><span>最近的生命体征</span></div>
        <div class="vitalTable">
          <table class="table">
            <thead>
              <tr>
                <th class="text-center">体征</th>
                <th class="text-center">最近值</th>
                <th class="text-center">24h Min</th>
                <th class="text-center">24h Max</th>
              </tr>
            </thead>
            <tbody v-if="handOverData.tblVitals.length">
              <tr v-for="(item,index) in handOverData.tblVitals">
                <td class="text-center">{{item.VITAL_NAME}}（{{ item.VITAL_TIME|filterDateSH}}）： {{item.VITAL_UNITS}}</td>
                <td class="text-center"> {{item.VITAL_VALUE}}</td>
                <td class="text-center"> {{item.VITAL_24H_MIN}}</td>
                <td class="text-center"> {{item.VITAL_24_MAX}}</td>
              </tr>
            </tbody>
            <tbody v-if="!handOverData.tblVitals.length">
              <tr><td colspan="4" style="color:red;">当前没有数据</td></tr>
            </tbody>
          </table>
        </div>
      </div>
      <!--24小时出入量-->
      <div class="Access">
        <div class="title"><span>24小时出入量</span></div>
        <div class="AccessTable">
          <table class="table">
            <thead>
              <tr>
                <th class="text-center">出入量项指标</th>
                <th class="text-center">{{IoTime.Nowadays |filterDateda}}</th>
                <th class="text-center">{{IoTime.LastDays |filterDateda}}</th>
                <th class="text-center">{{IoTime.LastTwoDays |filterDateda}}</th>
              </tr>
            </thead>
            <tbody v-if="handOverData.tblIO.length">
              <tr><td colspan="4">入量 Intake</td></tr>
              <tr v-for="(item,index) in handOverData.tblIO">
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '入量 Intake'||  item.IO_ITEM_GROUP =='输血 transfusion'">{{item.IO_ITEM_NAME}}&nbsp; &nbsp;&nbsp;{{item.IO_ITEM_UNITS}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '入量 Intake'||  item.IO_ITEM_GROUP =='输血 transfusion'">{{item.IO_ITEM_VALUE}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '入量 Intake'||  item.IO_ITEM_GROUP =='输血 transfusion'">{{item.IO_ITEM_VALUE2}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '入量 Intake'||  item.IO_ITEM_GROUP =='输血 transfusion'">{{item.IO_ITEM_VALUE3}}</td>
              </tr>
              <tr><td colspan="4">出量 Output</td></tr>
              <tr v-for="(item,index) in handOverData.tblIO">
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '出量 Output'">{{item.IO_ITEM_NAME}}&nbsp; &nbsp;&nbsp;{{item.IO_ITEM_UNITS}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '出量 Output'">{{item.IO_ITEM_VALUE}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '出量 Output'">{{item.IO_ITEM_VALUE2}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '出量 Output'">{{item.IO_ITEM_VALUE3}}</td>
              </tr>
              <tr><td colspan="4">总计 Total Sunmary</td></tr>
              <tr v-for="(item,index) in handOverData.tblIO" style="border-bottom:1px solid #ddd;">
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '总计 Total Sunmary'">{{item.IO_ITEM_NAME}}&nbsp; &nbsp;&nbsp;{{item.IO_ITEM_UNITS}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '总计 Total Sunmary'">{{item.IO_ITEM_VALUE}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '总计 Total Sunmary'">{{item.IO_ITEM_VALUE2}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP == '总计 Total Sunmary'">{{item.IO_ITEM_VALUE3}}</td>
              </tr>
              <tr v-for="(item,index) in handOverData.tblIO"><td colspan="4" v-if="item.IO_ITEM_GROUP != '入量 Intake' && item.IO_ITEM_GROUP != '出量 Output' && item.IO_ITEM_GROUP != '总计 Total Sunmary'&& item.IO_ITEM_GROUP !='输血 transfusion'">其他</td></tr>
              <tr v-for="(item,index) in handOverData.tblIO">
                <td class="text-center" v-if="item.IO_ITEM_GROUP != '入量 Intake' && item.IO_ITEM_GROUP != '出量 Output' && item.IO_ITEM_GROUP != '总计 Total Sunmary'&& item.IO_ITEM_GROUP !='输血 transfusion'">{{item.IO_ITEM_NAME}}&nbsp; &nbsp;&nbsp;{{item.IO_ITEM_UNITS}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP != '入量 Intake' && item.IO_ITEM_GROUP != '出量 Output' && item.IO_ITEM_GROUP != '总计 Total Sunmary'&& item.IO_ITEM_GROUP !='输血 transfusion'">{{item.IO_ITEM_VALUE}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP != '入量 Intake' && item.IO_ITEM_GROUP != '出量 Output' && item.IO_ITEM_GROUP != '总计 Total Sunmary'&& item.IO_ITEM_GROUP !='输血 transfusion'">{{item.IO_ITEM_VALUE2}}</td>
                <td class="text-center" v-if="item.IO_ITEM_GROUP != '入量 Intake' && item.IO_ITEM_GROUP != '出量 Output' && item.IO_ITEM_GROUP != '总计 Total Sunmary'&& item.IO_ITEM_GROUP !='输血 transfusion'">{{item.IO_ITEM_VALUE3}}</td>
              </tr>
            </tbody>
            <tbody v-if="!handOverData.tblIO.length">
              <tr><td colspan="4" style="color:red;">当前没有数据</td></tr>
            </tbody>
          </table>
        </div>
      </div>
      <!--神经系统-->
      <div class="nervous">
        <div class="title"><span>神经系统</span></div>
        <div class="form-group clearfix">
          <label for="GlasGow" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">GlasGow 评分：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="GlasGow" placeholder="如有昏迷，昏迷原因，近期变化 " v-model="saveChange.PATIENT_RECORD_NEURO.NEURO_GLASGOW">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 ">CT(最近一次)：</label>
          <div class="col-sm-8 " v-if ="handOverData.tblNeuro.length">
            ({{handOverData.tblNeuro[0].NEURO_LASTCT_TIME | filterDateT}})&nbsp; &nbsp;{{handOverData.tblNeuro[0].NEURO_LASTCT_DESC}}
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="nervousTreatment" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">目前治疗方案：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="nervousTreatment" placeholder="神经系统方案 " v-model="saveChange.PATIENT_RECORD_NEURO.NEURO_SOLUTION">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="plan" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">计 划：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="plan" placeholder="神经系统计划 " v-model="saveChange.PATIENT_RECORD_NEURO.NEURO_PLAN">
          </div>
        </div>
      </div>
      <!--心血管系统-->
      <div class="cardio" >
        <div class="title"><span>心血管系统</span></div>
        <div class="form-group clearfix">
          <label for="CardiacFunction" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">心功能情况：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="CardiacFunction" placeholder="心功能是否异常 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CARDIAC_STATUS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 ">心脏超声Echo：</label>
          <div class="col-sm-8 " v-if="handOverData.tblCardio.length">
            {{handOverData.tblCardio[0].CARDIO_ECHO_TIME | filterDateT}}
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Ultrasound" class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">我科超声评估：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="Ultrasound" placeholder="请输入评估意见 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_ICUECHO_ASSESSMENT">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="PICCO " class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">PICCO 评估：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="PICCO " placeholder="请输入评估意见 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_PICCO">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 ">CVP(时间)：</label>
          <div class="col-sm-8 " v-if="handOverData.tblCardio.length">
            <span v-if="handOverData.tblCardio[0].CARDIO_CVP_TIME != null">（{{handOverData.tblCardio[0].CARDIO_CVP_TIME | filterDateT}}）&nbsp; &nbsp;{{handOverData.tblCardio[0].CARDIO_CVP}}</span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="CapacityStatus " class="col-sm-3  control-label text-right col-lg-2 " style="margin-top:6px;">容量状态：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="CapacityStatus " placeholder="正常/不足/超负荷/补液实验 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CAPACITY">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">NT-proBNP(时间)：</label>
          <div class="col-sm-8 " v-if="handOverData.tblCardio.length">
            <span v-if="handOverData.tblCardio[0].CARDIO_NT_PROBNP_TIME != null">（{{handOverData.tblCardio[0].CARDIO_NT_PROBNP_TIME | filterDateT}}）&nbsp; &nbsp;{{handOverData.tblCardio[0].CARDIO_NT_PROBNP}}</span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">心肌损伤心肌酶：</label>
          <div class="col-sm-8 " v-if="handOverData.tblCardio.length">
             cTn&nbsp; T：&nbsp;{{handOverData.tblCardio[0].CARDIO_CTNT}}&nbsp; <span v-if="handOverData.tblCardio[0].CARDIO_CTNT!=null">ng/dl</span> &nbsp; &nbsp;   cTn&nbsp; I： &nbsp;{{handOverData.tblCardio[0].CARDIO_CTNI}} &nbsp; <span v-if="handOverData.tblCardio[0].CARDIO_CTNI != null">ng/dl</span> &nbsp; &nbsp;  CK-MB：&nbsp;{{handOverData.tblCardio[0].CARDIO_CKMB}}&nbsp; <span v-if="handOverData.tblCardio[0].CARDIO_CKMB!=null">ng/dl</span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="HeartPlan" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">针对心脏的处理：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="HeartPlan " placeholder="心脏计划 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CARDIAC_PLAN">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="bloodPressure" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#血 压：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="bloodPressure" placeholder="血压 " v-model="saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="cardioDiagnosis" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">目前诊断：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="cardioDiagnosis" placeholder="高血压 /低血压" v-model="saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE_MEDICATION">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="HeartBoost" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否使用升压药物：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="HeartBoost" placeholder="如去甲肾/多巴酚丁胺/巴多胺/肾上腺素" v-model="saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE_STATUS">
          </div>
        </div>
      </div>
      <!--感染性疾病-->
      <div class="InfectiousDisease">
        <div class="title"><span>感染性疾病</span></div>
        <div class="form-group clearfix">
          <label for="Infectious" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#感染部位： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="Infectious" placeholder="感染部位" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_ID_Infection_Site">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsHAP_VAP" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#是否有HAP/VAP： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsHAP_VAP" placeholder="是否有HAP/VAP" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_ID_HAP_VAP">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsResistantDacteria" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#是否有多重耐药菌： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsResistantDacteria" placeholder="是否有多重耐药菌" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_ID_MULTIDRUG_RESISTANT">
          </div>
        </div>
      </div>
      <!--实验室检查-->
      <div class="Lab">
        <div class="title"><span>实验室检查</span></div> 
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">血常规：</label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">WBC：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblLab.length ">
                <span v-if=" handOverData.tblLab[0].LAB_BLOOD_WBC != null">{{handOverData.tblLab[0].LAB_BLOOD_WBC}}&nbsp;×10<sup>9</sup>/L</span>
              </div>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">N%：</label>
            <div class="col-sm-2 ">
              <span v-if ="handOverData.tblLab.length">{{handOverData.tblLab[0].LAB_BLOOD_N_PERCENT}}</span>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">Lmp：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblLab.length ">
                <span v-if=" handOverData.tblLab[0].LAB_BLOOD_LMP != null">{{handOverData.tblLab[0].LAB_BLOOD_LMP}}&nbsp;×10<sup>9</sup>/L</span>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;"></label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">Hb：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblLab.length ">
                <span v-if="handOverData.tblLab[0].LAB_BLOOD_HB != null">{{handOverData.tblLab[0].LAB_BLOOD_HB}}&nbsp; g/I</span>
              </div>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">HCT：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblLab.length ">
                <span v-if=" handOverData.tblLab[0].LAB_BLOOD_HCT != null">{{handOverData.tblLab[0].LAB_BLOOD_HCT}}&nbsp; %</span>
              </div>
            </div>
          </div>

        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">微生物结果：</label>
          <div class="col-sm-8 ">

          </div>
        </div>
        <div class="form-group clearfix">
          <div v-for="(item,index) in handOverData.tblMicroReport" v-if="handOverData.tblMicroReport.length">
            <label :class="['control-label', 'text-right', 'col-lg-2' ,{'col-sm-2': index%2 != 1 ,'pull-left': index%2 != 0}]" style="padding-left:0;margin-bottom:10px;min-width:130px;">{{item.Time_Report | filterDateSH}}</label>
            <div class="col-sm-4 " style="margin-bottom:10px;">
              {{item.Name}}
            </div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsAntibiotic" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否抗生素敏感： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsAntibiotic" placeholder="是否抗生素敏感" v-model="saveChangeA.PATIENT_RECORD_LAB.LAB_ANTIBIOTICS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="OtherInspection" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">其他检验结果： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="OtherInspection" placeholder="其他检验结果" v-model="saveChangeA.PATIENT_RECORD_LAB.LAB_OTHER">
          </div>
        </div>
      </div>
      <!--呼吸系统-->
      <div class="Resp">
        <div class="title"><span>呼吸系统</span></div>
        <div class="form-group clearfix">
          <label for="RespDiagnosis" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#诊 断：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="RespDiagnosis" placeholder="呼吸系统诊断情况 " v-model="saveChangeB.PATIENT_RECORD_RESP.RESP_DIAGNOSIS">
          </div>
        </div>
        <div v-if="handOverData.tblResp.length">
          <div class="form-group clearfix">
            <label for="BloodDiagnosis" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">血气分析诊断：</label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">PH：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_PH}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">PO2：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_PO2}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">PCO2：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_PCO2}}
            </div>
          </div>

          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;"></label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">BE：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_BE}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">HCO<sub>3</sub>：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_HCO3}}

            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">Hb：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_HB}}

            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;"></label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">Ca<sup>2+</sup>：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_CA}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">K<sup>+</sup>：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_K}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">Na<sup>+</sup>：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_NA}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;"></label>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">CI<sup>-</sup>：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_CI}}
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">乳酸：</label>
            <div class="col-sm-2 ">
              {{handOverData.tblResp[0].RESP_ABG_LACTATE}}
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">胸片CXR(时间)：</label>
            <div class="col-sm-8 ">
              <span v-if="handOverData.tblResp[0].RESP_CXR_TIME">({{handOverData.tblResp[0].RESP_CXR_TIME | filterDateSH}})</span>
              <div>
                <textarea v-model="handOverData.tblResp[0].RESP_CXR_DESC" disabled style="background:#fff;border:0;resize:none;width:100%;height:auto;overflow:hidden;"></textarea>
              </div>
            </div>
          </div>
          <div class="form-group clearfix">
            <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">胸部CT(时间)：</label>
            <div class="col-sm-8 ">
              <span v-if="handOverData.tblResp[0].RESP_CT_TIME">({{handOverData.tblResp[0].RESP_CT_TIME | filterDateSH}})</span>
              <div>
                <textarea v-model="handOverData.tblResp[0].RESP_CT_DESC" disabled style="background:#fff;border:0;resize:none;width:100%;height:auto;overflow:hidden;"></textarea>
              </div>
            </div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="NextPlan" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">下一步计划：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="NextPlan" placeholder="下一步计划 " v-model="saveChangeB.PATIENT_RECORD_RESP.RESP_PLAN">
          </div>
        </div>
      </div>
      <!--胃肠道-->
      <div class="Gastrointestinal">
        <div class="title"><span>胃肠道</span></div>
        <div class="form-group clearfix">
          <label for="GastrointestinalDiagnosis" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#诊 断：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="GastrointestinalDiagnosis" placeholder="胃肠道诊断情况 " v-model="saveChangeB.PATIENT_RECORD_GI.GI_DIAGNOSIS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="isTenderness" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否有压痛：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="isTenderness" placeholder="是否有压痛 " v-model="saveChangeB.PATIENT_RECORD_GI.GI_PRESSURE_PAIN">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="isBloating" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否有腹胀：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="isBloating" placeholder="是否有腹胀 " v-model="saveChangeB.PATIENT_RECORD_GI.GI_ABDOMINAL_DISTENSION">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="StoolCondition" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">大便的情况：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="StoolCondition" placeholder="次数,性状，大便常规，涂片（球杆比），培养，使用的药物 " v-model="saveChangeB.PATIENT_RECORD_GI.GI_STOOL">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">腹腔压力：</label>
          <div class="col-sm-8 " v-if="handOverData.tblGI[0]">
            <span v-if="handOverData.tblGI[0].GI_ABDOMINAL_PRESSURE_TIME">({{handOverData.tblGI[0].GI_ABDOMINAL_PRESSURE_TIME | filterDateSH}})</span>
            <span v-if="handOverData.tblGI[0].GI_ABDOMINAL_PRESSURE">{{handOverData.tblGI[0].GI_ABDOMINAL_PRESSURE}} cmHg</span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsPPI" class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否使用PPI：</label>
          <div class="col-sm-8 ">
            <input type="text" class="form-control" id="IsPPI" placeholder="是否使用过PPI" v-model="saveChangeB.PATIENT_RECORD_GI.GI_PPI">
          </div>
        </div>
      </div>
      <!--营养-->
      <div class="nutrition">
        <div class="title"><span>营养</span></div>
        <div class="form-group clearfix">
          <label for="NRS2000" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#NRS2000 or nutric评分：</label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="NRS2000" placeholder="NRS2000or nutric评分" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_NRS2000_SCORE">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="NutritionalMode" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">营养方式： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="NutritionalMode" placeholder="1、无法营养 2、肠内营养 3、肠外营养" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_WAY">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="NutrientSolution" class="col-sm-3 control-label text-right col-lg-2" style="padding-left:0;margin-top:6px;">营养液： </label>
          <div class="col-sm-3">
            <input type="number" class="form-control" id="NutrientSolution" placeholder="请输入数量" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_NUTRITION_LIQUID"><span style="position:absolute;right: -5px;top: 7px;">ml</span>
          </div>
          <label for="TotalHotCard" class="control-label text-right pull-left" style="padding-left:0;margin-top:6px;width:15%;">总热卡： </label>
          <div class="col-sm-3">
            <input type="number" class="form-control" id="TotalHotCard" placeholder="请输入数量" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_TOTALCALORIES"><span style="position:absolute;right: -28px;top: 7px;">Kcal/d</span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="Tolerance" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">耐受情况： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="Tolerance" placeholder="耐受情况" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_TOLERANCE">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="NutritionPlan" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">下一步计划： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="NutritionPlan" placeholder="补充营养的下一步计划" v-model="saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_PLAN">
          </div>
        </div>
      </div>
      <!--肾功能-->
      <div class="Renal" >
        <div class="title"><span>肾功能</span></div>
        <div class="form-group clearfix">
          <label for="AKIORCKD" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#是否有AKI OR CKD/AKI 分级： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="AKIORCKD" placeholder="是否有AKI OR CKD/AKI 分级状况" v-model="saveChangeC.PATIENT_RECORD_RENAL.RENAL_AKI_GRADE">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;">BUN/Cr： </label>
          <div class="col-sm-8" v-if="handOverData.tblRenal.length ">
            <span v-if="handOverData.tblRenal[0].RENAL_COLLECT_TIME != null">({{handOverData.tblRenal[0].RENAL_COLLECT_TIME | filterDateSH}})&nbsp;&nbsp; </span>
            <span v-if="handOverData.tblRenal[0].RENAL_BUN != null ">{{handOverData.tblRenal[0].RENAL_BUN}} </span>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsCRRT" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">是否有CRRT指征： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsCRRT" placeholder="是否有CRRT指征" v-model="saveChangeC.PATIENT_RECORD_RENAL.RENAL_CRRT">
          </div>
        </div>
      </div>
      <!--肝功能-->
      <div class="hepatic" >
        <div class="title"><span>肝功能</span></div>
        <div class="form-group clearfix">
          <label for="Ishepatic" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;"># 是否有肝功能不全： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="Ishepatic" placeholder="是否有肝功能不全" v-model="saveChangeC.PATIENT_RECORD_HEPATIC.HEPATIC_DIAGNOSIS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">ALT：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblHepatic.length">
              {{handOverData.tblHepatic[0].HEPATIC_ALT}}
            </div>
          </div>
          <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">AST：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblHepatic.length">
              {{handOverData.tblHepatic[0].HEPATIC_AST}}
            </div>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">TBIL：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblHepatic.length">
                {{handOverData.tblHepatic[0].HEPATIC_TBIL}}
              </div>
              </div>
            </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">DBIL：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblHepatic.length">
              {{handOverData.tblHepatic[0].HEPATIC_DBIL}}
            </div>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">IBIL：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblHepatic.length">
                {{handOverData.tblHepatic[0].HEPATIC_IBIL}}
              </div>
              </div>
              <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">ALP：</label>
              <div class="col-sm-2 ">
                <div v-if="handOverData.tblHepatic.length">
                  {{handOverData.tblHepatic[0].HEPATIC_ALP}}
                </div>
                </div>
              </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">ALB：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblHepatic.length">
              {{handOverData.tblHepatic[0].HEPATIC_ALB}}
            </div>
            </div>
            <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">GLU：</label>
            <div class="col-sm-2 ">
              <div v-if="handOverData.tblHepatic.length">
                {{handOverData.tblHepatic[0].HEPATIC_GLU}}
                </div>
              </div>
            </div>
      </div>
      <!--凝血功能-->
      <div class="coagulation" >
        <div class="title"><span>凝血功能</span></div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">PT：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_PT}}</div>
          </div>
          <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">APTT：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_APTT}}</div>
          </div>
          <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">INR：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_INR}}</div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">FIB：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_FIB}}</div>
          </div>
          <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">PT%：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_PT_PERCENT}}</div>
          </div>
          <label class="text-right control-label pull-left" style="padding-left:0;width:60px;">platrlet：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length">{{handOverData.tblCoagulation[0].COAGULATION_PLATELET}}</div>
          </div>
        </div>
        <div class="form-group clearfix">
          <label class="col-sm-3  control-label text-right col-lg-2 " style="padding-left:0;">D-2聚体：</label>
          <div class="col-sm-2 ">
            <div v-if="handOverData.tblCoagulation.length"> {{handOverData.tblCoagulation[0].COAGULATION_D2}}</div>
          </div>

        </div>
        <div class="form-group clearfix">
          <label for="coagulationTreatmentPlan" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">目前处理方案： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="coagulationTreatmentPlan" placeholder="凝血功能的处理方案" v-model="saveChangeC.PATIENT_RECORD_COAGULATION.COAGULATION_PLAN">
          </div>
        </div>
      </div>
      <!--内分泌系统-->
      <div class="Endo">
        <div class="title"><span>内分泌系统</span></div>
        <div class="form-group clearfix">
          <label for="IsDiabetes" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#是否有糖尿病： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsDiabetes" placeholder="是否有糖尿病" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_ENDO_DIABETES">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="IsOtherDiseases" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#其他疾病： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="IsOtherDiseases" placeholder="是否有其他疾病" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_ENDO_COMMENTS">
          </div>
        </div>
      </div>
      <!--血液系统疾病-->
      <div class="Heme">
        <div class="title"><span>血液系统疾病</span></div>
        <div class="form-group clearfix">
          <label for="BloodSystem" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#诊断： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="BloodSystem" placeholder="血液系统疾病诊断结果" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_HEME_DIAGNOSIS">
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="SpecialTreatment" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;margin-top:6px;">#是否特殊治疗： </label>
          <div class="col-sm-8">
            <input type="text" class="form-control" id="SpecialTreatment" placeholder="是否特殊治疗" v-model="saveChangeA.PATIENT_RECORD_EXT.EXT_HEME_TREAMENT">
          </div>
        </div>
      </div>

      <!--DVT预防-->
      <!--导管置留情况-->
      <div class="IndwellingLines">
        <div class="title"><span>导管置留情况</span></div>
        <div class="IndwellingTable">
          <table class="table">
            <thead>
              <tr>
                <th class="text-center">序号</th>
                <th class="text-center">置管</th>
                <th class="text-center">置管时间</th>
                <th class="text-center">部位</th>
                <th class="text-center">长度</th>
              </tr>
            </thead>
            <tbody v-if="handOverData.tblDuct.length">
              <tr v-for="(item,index) in handOverData.tblDuct">
                <td class="text-center">{{index + 1}}</td>
                <td class="text-center"> {{item.Name}}</td>
                <td class="text-center"> {{item.Date | filterDateTime}}</td>
                <td class="text-center"> {{item.Location}}</td>
                <td class="text-center">{{item.Length}}</td>
              </tr>
            </tbody>
            <tbody v-if="!handOverData.tblDuct.length">
              <tr><td colspan="5" style="color:red;">当前没有数据</td></tr>
            </tbody>
          </table>
        </div>
      </div>
      <!--抗生素使用情况-->
      <div class="Antibiotics" v-if="handOverData.tblAntibiotics.length">
        <div class="title"><span>抗生素使用情况</span></div>
        <div class="form-group clearfix">
          <div v-for="(item,index) in handOverData.tblAntibiotics">
            <label :class="['control-label', 'text-right', 'col-lg-2' ,{'col-sm-2': index%2 != 1 ,'odd': index%2 != 0}]" style="padding-left:0;margin-bottom:10px;">{{item.Time_Exe | filterDateSH}}</label>
            <div class="col-sm-4 " style="margin-bottom:10px;">
              {{item.ORDER_TEXT}}
            </div>
          </div>
        </div>
      </div>
      <div class="Antibiotics" v-if="!handOverData.tblAntibiotics.length">
        <div class="title"><span>抗生素使用情况</span></div>
        <div style="color:red;padding-left:10%;">
          当前没有抗生素使用情况数据
        </div>
      </div>
      <!--总结-->
      <div class="toSumUp">
        <div class="title"><span>总结</span></div>
        <div class="form-group clearfix">
          <label for="YesterdayTreatment" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;">昨日治疗调整： </label>
          <div class="col-sm-8">
            <textarea class="form-control" id="YesterdayTreatment" v-grow-height="true" placeholder="昨日治疗调整情况" v-model="saveChange.PATIENT_RECORD.LAST_TREAMENT" maxlength="300"></textarea>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="LastSituation" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;">昨夜情况： </label>
          <div class="col-sm-8">
            <textarea class="form-control" id="LastSituation" v-grow-height="true" placeholder="昨夜情况" v-model="saveChange.PATIENT_RECORD.LAST_ILLNESS_STATE" maxlength="300"></textarea>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="ComprehensiveEvaluation" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;">综合评估： </label>
          <div class="col-sm-8">
            <textarea class="form-control" id="ComprehensiveEvaluation" v-grow-height="true" placeholder="综合评估" v-model="saveChange.PATIENT_RECORD.LAST_DIAGNOSIS" maxlength="300"></textarea>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="PlanToday" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;" >今日计划： </label>
          <div class="col-sm-8">
            <textarea class="form-control" id="PlanToday" placeholder="今日计划" v-grow-height="true" v-model="saveChange.PATIENT_RECORD.TREAMENT_PLAN" maxlength="300"></textarea>
          </div>
        </div>
        <div class="form-group clearfix">
          <label for="AfterRounds" class="col-sm-3 control-label text-right col-lg-2 " style="padding-left:0;">查房后调整及理由： </label>
          <div class="col-sm-8">
            <textarea class="form-control" id="AfterRounds" placeholder="查房后调整及理由" v-grow-height="true" v-model="saveChange.PATIENT_RECORD.TREAMENT_ADJUSTMENT" maxlength="300"></textarea>
          </div>
        </div>
      </div>
    </div>
      <loading v-if="JSON.stringify(handOverData) == '{}' && isShow"></loading>
     <noSearch v-if="JSON.stringify(handOverData) == '{}' && !isShow"></noSearch>
    </div>
</template>
<script>
  import { formatDate, standardDate } from "@/components/common/date"; //引入时间转换JS
  import { apiGetPatientRecordInfo, apiAddPatientRecordInfo, apiAddPatientRecordInfoPlanA, apiAddPatientRecordInfoPlanB, apiAddPatientRecordInfoPlanC, apiSynPatientRecord} from '@/api/api' //引入查询某患者某一天的交班信息
  import loading from '@/components/loading/loading'
  import noSearch from '@/components/search/noSearch' //导入没有搜索结果组件
  import axios from 'axios';
export default {
    data() {
      return {
        date: this.$route.query.date,
        src:'',
        loginUser: {},  //存储当前登录用户的名字
        handOverData: {},  //存储当前交班的各种信息数据(从后台接收的)
        IoTime: {},     //存储当前出入量的时间
        isShow:true,
        saveChange: {   //存储当前交班的填写录入数据
          PATIENT_RECORD: {
            AMDITTING_REASON: '',   //基本信息里的入ICU原因
            LAST_TREAMENT: '',  //昨日治疗
            LAST_ILLNESS_STATE: '',  // 昨夜情况
            LAST_DIAGNOSIS: '',  //  综合评估
            TREAMENT_PLAN: '',  // 今日计划
            TREAMENT_ADJUSTMENT: ''  // 查房调整
         }, 
          PATIENT_RECORD_EXAM: {  //体格检查表
            EXAM_GENERAL: '',  //一般情况
            EXAM_HEENT: '',  //头面部
            EXAM_CV: '',     //心血管
            EXAM_LUNGS: '',   //肺
            EXAM_ABD: '',   //胃肠道
            EXAM_EXT: '',   //四肢
            EXAM_NEURO: '',  //神志
            EXAM_SKIN: ''  //皮肤
          },
          PATIENT_RECORD_NEURO: { //神经系统表
            NEURO_GLASGOW: '',     //评分
            NEURO_SOLUTION: '',  //治疗方案
            NEURO_PLAN: ''           //治疗计划
          },
        },
        saveChangeA: {
          PATIENT_RECORD_CARDIO: { //心血管系统表
            CARDIO_CARDIAC_STATUS: '', //是否心功能正常
            CARDIO_ICUECHO_ASSESSMENT: '', //我科评估意见
            CARDIO_PICCO: '', //PICCO评估
            CARDIO_CAPACITY: '', //容量状态
            CARDIO_CARDIAC_PLAN: '', //心脏计划
            BLOOD_PRESSURE: '', // 血压
            BLOOD_PRESSURE_MEDICATION: '',//目前诊断
            BLOOD_PRESSURE_STATUS: '' //是否使用升压药物
          },
          PATIENT_RECORD_EXT: {  //感染+内分泌+血液系统疾病
            EXT_ID_HAP_VAP: '', //是否有HAP/VAP
            EXT_ID_Infection_Site: '', //感染部位
            EXT_ID_MULTIDRUG_RESISTANT: '',  //是否多重耐药菌
            EXT_ENDO_DIABETES: '', //是否有糖尿病（内分泌）
            EXT_ENDO_COMMENTS: '', //其他疾病（内分泌）
            EXT_HEME_DIAGNOSIS: '', //诊断（血液系统疾病）
            EXT_HEME_TREAMENT: ''  // 是否有特殊治疗（血液系统疾病）
          },
          PATIENT_RECORD_LAB: {  //实验室检查
            LAB_ANTIBIOTICS: '',  //目前抗生素是否敏感
            LAB_OTHER: '', //其他检验结果
          },
        },
        saveChangeB: {
          PATIENT_RECORD_RESP: { //呼吸系统
            RESP_DIAGNOSIS: '', //诊断
            RESP_PLAN: ''  //下一步计划
          },
          PATIENT_RECORD_GI: {  //胃肠道
            GI_DIAGNOSIS: '', //诊断
            GI_PRESSURE_PAIN: '', //是否有压痛
            GI_ABDOMINAL_DISTENSION: '', //是否有腹胀
            GI_STOOL: '', //大便的情况
            GI_PPI: '', //是否是有PPI
          },
          PATIENT_RECORD_NUTRITION: { //营养
            NUTRITION_NRS2000_SCORE: '', // NRS2000评分
            NUTRITION_WAY: '', //营养方式
            NUTRITION_NUTRITION_LIQUID: '', //营养液
            NUTRITION_TOTALCALORIES: '', // 总热卡
            NUTRITION_TOLERANCE: '', //耐受情况
            NUTRITION_PLAN: '', // 营养计划
          },
        },
        saveChangeC: {
          PATIENT_RECORD_RENAL: { //肾功能
            RENAL_AKI_GRADE: '', //AKI分级
            RENAL_CRRT:'', // 是否有CRRT指征
          },
          PATIENT_RECORD_HEPATIC: { //肝功能
            HEPATIC_DIAGNOSIS:'', // 是否有肝功能不全
          },
          PATIENT_RECORD_COAGULATION: {//凝血功能
            COAGULATION_PLAN:'', // 目前处理方案
          }
        },
        
      }
    },
    created() {
       this.loginUser = JSON.parse(sessionStorage.getItem('user'));
       this.src = axios.defaults.baseURL;
        //console.log(this.src)
      ////console.log(standardDate(new Date()).substring(0, 7));
      //this.handOverData.QCInfoDate = standardDate(new Date()).substring(0, 7);

    },
    mounted() {
      this.GetPatientRecordInfo();
      this.GetIoTime();
    },
    methods: {
      btnSave() {  //保存操作
        //console.log(this.saveChange);
        apiAddPatientRecordInfo({   //传入后台数据(基本情况 + 体格检查 + 神经系统)
          jsonStr: JSON.stringify(this.saveChange),
          date: this.$route.query.date,
          patientNo: this.$store.getters.ID
        })
          .then(res => {
            //console.log(res)
          })
        apiAddPatientRecordInfoPlanA({ //传入后台数据(心血管系统 + 感染+内分泌+血液系统疾病 + 实验室检查)
          jsonStr: JSON.stringify(this.saveChangeA),
          date: this.$route.query.date,
          patientNo: this.$store.getters.ID
        })
          .then(res => {
            //console.log(res)
          })
        apiAddPatientRecordInfoPlanB({   //传入后台数据(呼吸系统 + 胃肠道 + 营养)
          jsonStr: JSON.stringify(this.saveChangeB),
          date: this.$route.query.date,
          patientNo: this.$store.getters.ID
        })
          .then(res => {
            //console.log(res)
          })
        apiAddPatientRecordInfoPlanC({  //传入后台数据(肾功能 + 肝功能 + 凝血功能+ 总结)
          jsonStr: JSON.stringify(this.saveChangeC),
          date: this.$route.query.date,
          patientNo: this.$store.getters.ID
        })
          .then(res => {
            //console.log(res)
          })
        //this.$toast.center('保存成功');
        this.$router.push({
          path: '/handOver/handOverList',
          query: { item : 9 }
        })
      },
      btnPrint() {  //打印操作
        let str = this.src + '/Report/ReportViewer?reportName=PatientInfoReport.frx&patientId=' + this.$store.getters.ID + '&date=' + this.$route.query.date + '&type=0';
        //console.log(str)
        this.$router.push({
          path: '/handOverPrint',
          query: { http: str ,item:9 }
        })
      },
      btnUpdate() {
        this.$toast.center('正在更新中……');
        apiSynPatientRecord({
          patientNo: this.$store.getters.ID,
          date: this.$route.query.date 
        })
          .then(res => {
            if (typeof (JSON.parse(res)) == "object" && Object.prototype.toString.call(JSON.parse(res)).toLowerCase() == "[object object]" && !JSON.parse(res).length) {
              this.GetPatientRecordInfo();
              setTimeout(() => {
                this.$toast.center('更新成功……');
              },2500)
            } else {
              setTimeout(() => {
                this.$toast.center('更新失败……');
              }, 2500)
            
            }
            //console.log(typeof (JSON.parse(res)) == "object" && Object.prototype.toString.call(JSON.parse(res)).toLowerCase() == "[object object]" && !JSON.parse(res).length); //判断是否返回为json对象  
          })
          .catch(err => {
            this.$toast.center('请求超时……');
          })
      },
      GetIoTime() {
        this.IoTime.Nowadays = this.date;
        let lastDays = new Date(this.date);
        this.IoTime.LastDays = standardDate(lastDays - 24 * 60 * 60 * 1000);
        this.IoTime.LastTwoDays = standardDate(lastDays - 24 * 60 * 60 * 2000);
        //console.log(this.IoTime)
      },
      GetPatientRecordInfo() {
        this.handOverData = {};
        apiGetPatientRecordInfo({
          patientId: this.$store.getters.ID,
          archiveDate: this.$route.query.date 
        })
          .then(res => {
            if (typeof (JSON.parse(res)) == "object" && Object.prototype.toString.call(JSON.parse(res)).toLowerCase() == "[object object]" && !JSON.parse(res).length) {
              this.isShow = true;
              this.handOverData = JSON.parse(res);
              //console.log(JSON.parse(res) )
              if (this.handOverData.tblPatientRecord.length) {    //当基本情况有值时赋值
                this.saveChange.PATIENT_RECORD.AMDITTING_REASON = this.handOverData.tblPatientRecord[0].AMDITTING_REASON;  //入ICU原因赋值
                this.saveChange.PATIENT_RECORD.LAST_TREAMENT = this.handOverData.tblPatientRecord[0].LAST_TREAMENT;  //昨日治疗
                this.saveChange.PATIENT_RECORD.LAST_ILLNESS_STATE = this.handOverData.tblPatientRecord[0].LAST_ILLNESS_STATE;  // 昨夜情况
                this.saveChange.PATIENT_RECORD.LAST_DIAGNOSIS = this.handOverData.tblPatientRecord[0].LAST_DIAGNOSIS;  //  综合评估
                this.saveChange.PATIENT_RECORD.TREAMENT_PLAN = this.handOverData.tblPatientRecord[0].TREAMENT_PLAN;   // 今日计划
                this.saveChange.PATIENT_RECORD.TREAMENT_ADJUSTMENT = this.handOverData.tblPatientRecord[0].TREAMENT_ADJUSTMENT;   // 查房调整
              }
              if (this.handOverData.tblPhysical.length) {   //当体格检查有值时赋值
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_GENERAL = this.handOverData.tblPhysical[0].EXAM_GENERAL;    //一般情况
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_HEENT = this.handOverData.tblPhysical[0].EXAM_HEENT;   //头面部
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_CV = this.handOverData.tblPhysical[0].EXAM_CV;     //心血管
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_LUNGS = this.handOverData.tblPhysical[0].EXAM_LUNGS; //肺
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_ABD = this.handOverData.tblPhysical[0].EXAM_ABD;   //胃肠道
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_EXT = this.handOverData.tblPhysical[0].EXAM_EXT;   //四肢
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_NEURO = this.handOverData.tblPhysical[0].EXAM_NEURO; //神志
                this.saveChange.PATIENT_RECORD_EXAM.EXAM_SKIN = this.handOverData.tblPhysical[0].EXAM_SKIN;   //皮肤
              }
              if (this.handOverData.tblNeuro.length) {  //当神经系统有值时赋值
                this.saveChange.PATIENT_RECORD_NEURO.NEURO_GLASGOW = this.handOverData.tblNeuro[0].NEURO_GLASGOW;  //评分
                this.saveChange.PATIENT_RECORD_NEURO.NEURO_SOLUTION = this.handOverData.tblNeuro[0].NEURO_SOLUTION;  //治疗方案
                this.saveChange.PATIENT_RECORD_NEURO.NEURO_PLAN = this.handOverData.tblNeuro[0].NEURO_PLAN;  //治疗计划
              }
              if (this.handOverData.tblCardio.length) { //当心血管系统有值时赋值
                this.saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CARDIAC_STATUS = this.handOverData.tblCardio[0].CARDIO_CARDIAC_STATUS; //是否心功能正常
                this.saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_ICUECHO_ASSESSMENT = this.handOverData.tblCardio[0].CARDIO_ICUECHO_ASSESSMENT; //我科评估意见
                this.saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_PICCO = this.handOverData.tblCardio[0].CARDIO_PICCO;  //PICCO评估
                this.saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CAPACITY = this.handOverData.tblCardio[0].CARDIO_CAPACITY; //容量状态
                this.saveChangeA.PATIENT_RECORD_CARDIO.CARDIO_CARDIAC_PLAN = this.handOverData.tblCardio[0].CARDIO_CARDIAC_PLAN; //心脏计划
                this.saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE = this.handOverData.tblCardio[0].BLOOD_PRESSURE; // 血压
                this.saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE_MEDICATION = this.handOverData.tblCardio[0].BLOOD_PRESSURE_MEDICATION; //目前诊断
                this.saveChangeA.PATIENT_RECORD_CARDIO.BLOOD_PRESSURE_STATUS = this.handOverData.tblCardio[0].BLOOD_PRESSURE_STATUS; //是否使用升压药物
              }
              if (this.handOverData.tblEXT.length) {  //当感染+内分泌+血液系统疾病有值时赋值
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_ID_Infection_Site = this.handOverData.tblEXT[0].EXT_ID_Infection_Site; //感染部位
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_ID_HAP_VAP = this.handOverData.tblEXT[0].EXT_ID_HAP_VAP; //是否有HAP/VAP
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_ID_MULTIDRUG_RESISTANT = this.handOverData.tblEXT[0].EXT_ID_MULTIDRUG_RESISTANT; //是否多重耐药菌
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_ENDO_DIABETES = this.handOverData.tblEXT[0].EXT_ENDO_DIABETES; //是否有糖尿病（内分泌）
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_ENDO_COMMENTS = this.handOverData.tblEXT[0].EXT_ENDO_COMMENTS; //其他疾病（内分泌）
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_HEME_DIAGNOSIS = this.handOverData.tblEXT[0].EXT_HEME_DIAGNOSIS; //诊断（血液系统疾病）
                this.saveChangeA.PATIENT_RECORD_EXT.EXT_HEME_TREAMENT = this.handOverData.tblEXT[0].EXT_HEME_TREAMENT; // 是否有特殊治疗（血液系统疾病）
              }
              if (this.handOverData.tblLab.length) {  //当实验室检查有值时赋值
                this.saveChangeA.PATIENT_RECORD_LAB.LAB_ANTIBIOTICS = this.handOverData.tblLab[0].LAB_ANTIBIOTICS; //目前抗生素是否敏感
                this.saveChangeA.PATIENT_RECORD_LAB.LAB_OTHER = this.handOverData.tblLab[0].LAB_OTHER; //其他检验结果
              }
              if (this.handOverData.tblResp.length) {  //当呼吸系统有值时赋值
                this.saveChangeB.PATIENT_RECORD_RESP.RESP_DIAGNOSIS = this.handOverData.tblResp[0].RESP_DIAGNOSIS;  //诊断
                this.saveChangeB.PATIENT_RECORD_RESP.RESP_PLAN = this.handOverData.tblResp[0].RESP_PLAN;  //下一步计划
              }
              if (this.handOverData.tblGI.length) { //当胃肠道有值时赋值
                this.saveChangeB.PATIENT_RECORD_GI.GI_DIAGNOSIS = this.handOverData.tblGI[0].GI_DIAGNOSIS; // 诊断
                this.saveChangeB.PATIENT_RECORD_GI.GI_PRESSURE_PAIN = this.handOverData.tblGI[0].GI_PRESSURE_PAIN;  //是否有压痛
                this.saveChangeB.PATIENT_RECORD_GI.GI_ABDOMINAL_DISTENSION = this.handOverData.tblGI[0].GI_ABDOMINAL_DISTENSION; //是否有腹胀
                this.saveChangeB.PATIENT_RECORD_GI.GI_STOOL = this.handOverData.tblGI[0].GI_STOOL; //大便的情况
                this.saveChangeB.PATIENT_RECORD_GI.GI_PPI = this.handOverData.tblGI[0].GI_PPI;  //是否是有PPI
              }
              if (this.handOverData.tblNutrition.length) { //当营养有值时赋值
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_NRS2000_SCORE = this.handOverData.tblNutrition[0].NUTRITION_NRS2000_SCORE; // NRS200评分
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_WAY = this.handOverData.tblNutrition[0].NUTRITION_WAY; //营养方式
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_NUTRITION_LIQUID = this.handOverData.tblNutrition[0].NUTRITION_NUTRITION_LIQUID; //营养液
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_TOTALCALORIES = this.handOverData.tblNutrition[0].NUTRITION_TOTALCALORIES; // 总热卡
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_TOLERANCE = this.handOverData.tblNutrition[0].NUTRITION_TOLERANCE;  //耐受情况
                this.saveChangeB.PATIENT_RECORD_NUTRITION.NUTRITION_PLAN = this.handOverData.tblNutrition[0].NUTRITION_PLAN;  // 营养计划
              }
              if (this.handOverData.tblRenal.length) {//当肾功能有值时赋值
                this.saveChangeC.PATIENT_RECORD_RENAL.RENAL_AKI_GRADE = this.handOverData.tblRenal[0].RENAL_AKI_GRADE; //AKI评分
                this.saveChangeC.PATIENT_RECORD_RENAL.RENAL_CRRT = this.handOverData.tblRenal[0].RENAL_CRRT; // 是否有CRRT指征
              }
              if (this.handOverData.tblHepatic.length) { //当肝功能有值时赋值
                this.saveChangeC.PATIENT_RECORD_HEPATIC.HEPATIC_DIAGNOSIS = this.handOverData.tblHepatic[0].HEPATIC_DIAGNOSIS;
              }
              if (this.handOverData.tblCoagulation.length) { //当凝血功能有值时赋值
                this.saveChangeC.PATIENT_RECORD_COAGULATION.COAGULATION_PLAN = this.handOverData.tblCoagulation[0].COAGULATION_PLAN;
              }
            } else {
              this.isShow = false;
              
            }
            //console.log(JSON.parse(res))
          })
          .catch(err => {
            this.$toast.center('当前请求有问题，请联系管理员！');
          })
      }
    },
    filters: {
      filterDateSH(time) {
        if (!time) {
          return time;
        } else {
          return time.replace('T', ' ').substring(5, 16).replace('-', '/');
        }
      },
      filterDateda(time) {
        if (!time) {
          return time;
        } else {
          return time.substring(5, 7) + '/' + time.substring(8, 10);
        }
      }
    },
    components: {
      loading,
      noSearch
    }
}
</script>
<style scoped>
  #handOverDetails{
   padding:20px 0;
  }
  .information {
    padding-left: 40px;
    font-size: 16px;
    margin-bottom: 10px;
  }
  .row {
    margin: 0;
  }
    .information button {
      padding: 7px 15px;
      background-color: #11a7f3;
      color: #fff;
    }
  .handOverContent {
    height: calc(100% - 30px);
    padding-bottom: 20px;
    overflow-y: auto;
  }
  .title {
    font-size: 18px;
    padding-left: 40px;
    margin-bottom: 15px;
    margin-top: 15px;
  }
  textarea.form-control{
    text-indent:10px;
    padding:0;
  }
  .admission .title {
    margin-top: 0;
  }

  .title span:before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 20px;
    border-radius: 8px;
    margin-right: 8px;
    background: #11a7f3;
    vertical-align: text-top;
  }
  .control-label{
    font-weight:normal;
    padding-right:0;
  }
  .form-group{
    /*display:flex;*/
    margin-bottom:10px;
  }
   label{
    margin-bottom:0;
  }
  table > thead > tr > th {
    border-bottom: none;
  }
  table.table {
    width: 80%;
    margin: 0 auto;
  }
  .table thead, .vitalTable tbody {
    border-top: none;
  }
  .table tbody {
    border: 1px solid #ddd;
    border-top: 0;
  }
  .table thead tr {
    height: 42px;
    line-height: 42px;
    background-color: #11a7f3;
    color: #fff;
  }

  .table tbody tr td {
    vertical-align: middle;
    border-top: 1px solid #ddd;
    color: #333;
    border-right: 1px solid #ddd;
  }

    .table tbody tr td:last-child {
      border-right: none;
    }

  .table tbody > tr:first-child > td {
    border-top: none;
  }
  @media screen and (min-width: 1200px) {
    table.table {
      width: 69%;
      margin-left: 13.4%;
    }
  }
</style>
